﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
    public interface ISupplierManagementService
    {
        /// <summary>
        /// 新增供应商
        /// </summary>
        /// <param name="supplier"></param>
        /// <returns></returns>
        Task AddAsync(WMSBasicSupplierManagement supplier);

        /// <summary>
        /// 带分页的供应商列表查询
        /// </summary>
        /// <param name="supplierName">供应商名称/编码</param>
        /// <param name="status">状态（1=启用/0=禁用）</param>
        /// <param name="industryId">所属行业ID</param>
        /// <param name="managerName">进货负责人姓名</param>
        /// <param name="currentPage">当前页码</param>
        /// <param name="pageSize">每页条数</param>
        /// <returns>分页模型（包含当前页数据和总条数）</returns>
        Task<PagedViewModel<SupplierListDTO>> GetAllSuppliersAsync( 
            string supplierName = null,
            string status = null,
            int? industryId = null,
            string managerName = null,
            int currentPage = 1,
            int pageSize = 10);
        /// <summary>
        /// 根据供应商编号获取详情
        /// </summary>
        /// <param name="supplierCode"></param>
        /// <returns></returns>
        Task<WMSBasicSupplierManagement> GetSupplierByCodeAsync(string supplierCode);
        /// <summary>
        /// 根据供应商ID获取详情
        /// </summary>
        /// <param name="supplierCode"></param>
        /// <returns></returns>
        Task<WMSBasicSupplierManagement> GetSupplierByIdAsync(long supplierId);

        /// <summary>
        /// 供应商修改
        /// </summary>
        /// <param name="supplier"></param>
        /// <returns></returns>
        Task UpdateAsync(WMSBasicSupplierManagement supplier);


        /// <summary>
        /// 逻辑删除
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public Task Delete(string supplier_code);

        /// <summary>
        /// 为其他页面的下拉框提供数据
        /// </summary>
        /// <returns></returns>
        public Task<List<SupplierListDTO>> GetAllSuppliersAsync();

    }
}
